﻿@model RiverCruise.Models.Ship.ShipsOverviewViewModel

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "Ships";
}
<div class="container-fluid">
    
    <!--searchform-->
    <div class="pull-right">
        @using (Ajax.BeginForm(null, null, new AjaxOptions()
        {
            HttpMethod = "get",
            InsertionMode = InsertionMode.Replace,
            UpdateTargetId = "pagerTarget"
        },
            new { @class="navbar-form"}))
        {
            <div class="input-group">
                <input type="text" class="form-control" placeholder="Search" name="searchText" id="searchText" data-otf-autocomplete="@Url.Action("AutoComplete", "Home")" data-autocomplete-submit="true">
                <div class="input-group-btn">
                    <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
                </div>
            </div>
        }
    </div>
    <!--searchform-->
    
    <span class="clearfix"></span>
    
    @if (!ViewData.ModelState.IsValid)
    {
        <div class="bs-callout bs-callout-warning text-warning">
            @Html.ValidationSummary()
        </div>
    }

    <h2>
        Ships
    </h2>

    @Html.Partial("~/Views/Home/_Ships.cshtml", Model)

</div>